From 21a22d686e71d8eb470d158f93ba80e43b7b221f Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 2 Dec 2022 17:32:29 +0700 Subject: input range filter, sort by ready stock --- src/pages/shop/brands/[slug].js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pages/shop/brands/[slug].js') diff --git a/src/pages/shop/brands/[slug].js b/src/pages/shop/brands/[slug].js index b532e7a7..c0524207 100644 --- a/src/pages/shop/brands/[slug].js +++ b/src/pages/shop/brands/[slug].js @@ -13,8 +13,8 @@ export async function getServerSideProps(context) { slug, page = 1, category = '', - price_from = '0', - price_to = '0', + price_from = '', + price_to = '', order_by = '', } = context.query; @@ -62,8 +62,8 @@ export default function BrandDetail({ const route = () => { let route = `/shop/brands/${slug}`; if (category) route += `&category=${category}`; - if (price_from > 0) route += `&price_from=${price_from}`; - if (price_to > 0) route += `&price_to=${price_to}`; + if (price_from) route += `&price_from=${price_from}`; + if (price_to) route += `&price_to=${price_to}`; if (order_by) route += `&order_by=${order_by}`; return route; } -- cgit v1.2.3